<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
use common\helpers\Helper;
/* @var $this yii\web\View */
/* @var $model backend\models\User */

$this->title = "用户详情";
$this->params['breadcrumbs'][] = ['label' => 'Users', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="user-view">

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
            'id',
            'name',
            ['attribute'=>'header','value'=>function($model){
                $images= Html::img(Helper::src($model->header,'',false, 'dimg'),['width'=>'120px','style'=>'margin:0 10px;']);
                return $images;
            },'format'=>'html'],
//            'access_token',
//            'unionid',
//            'token_expire',
            'award_num',
            'bet_num',
            'bet_win',
            [
                'attribute'=>'is_apply',
                'value'=>function($model){
                    return $model->is_apply == 1 ? '已申请' : '<font color="red">未申请</font>';
                },
                'label' => '是否申请领奖',
                'format' => 'raw'
            ],
//            'status',
        ],
    ]) ?>

</div>
